package com.dlc.felear.xiaoensale.utils;

import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;

public class DateTimeUtil {
    public static String getCurrentTImeYMD(){
        Calendar calendar=Calendar.getInstance();
        SimpleDateFormat sf=new SimpleDateFormat("yyyy-MM-dd");
        Date date=calendar.getTime();
        return sf.format(date);
    }
    public static String getCurrentTImeYMDHMS(){
        Calendar calendar=Calendar.getInstance();
        SimpleDateFormat sf=new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
        Date date=calendar.getTime();
        return sf.format(date);
    }

}
